#!/usr/bin/python
# -*- coding: utf-8 -*-
# @author: 高建平
# @description: 
#
from pydantic_settings import BaseSettings
from app.support.decorator import decorator_str
import os
from config.settings import ENV_FILE, FASTAPI_PROFILE,DEFAULT_FASTAPI_PROFILE

@decorator_str
class Settings(BaseSettings):
    HOST: str = '127.0.0.1'
    PORT: int = 3306
    USER: str = 'root'
    PASSWORD: str = '123456'
    DATABASE: str = 'fastapi'

    class Config:
        env_prefix = 'DB_'
        env_file = ENV_FILE+os.getenv(FASTAPI_PROFILE,DEFAULT_FASTAPI_PROFILE)



settings = Settings()
